disablehint = "This item is disabled because the brush doesn't have 6 faces."
if disable:
item.state=qmenu.disabled
try:
item.hint=item.hint + "\n\n" + disablehint
except (AttributeError):
item.hint="|" + disablehint
else:
item.o=o
item.newpoly = newpoly
item.view = view
for (menname, mapname, inv) in (("&Arch", "arch", 1), ("&Cap", "cap", 0)):
item = qmenu.item(menname, makecap)
item.inverse = inv
item.mapname = mapname
finishitem(item)
list.append(item)
cornerhint = """|Makes a smooth curve from the %s side of the brush to the back.
The texture is taken from the back wall, and sized across the curve (compressed a bit) to align with this texture as wrapped onto the %s wall.
To make a rounded corner, put a brush into a corner, project the texture of one of the room walls onto the paralell & `kissing' face of the brush, arrange the camera/view so you're looking square on at the brush and this face is the back one, then and RMB|Curves|right/left corner depending on whether the room-wall you're next to is to the right or the left.
If the textures on the two adjoining walls of the room are properly aligned, the texture on the curve will be too (compressed a bit, but not so as to make much of a difference).
"""
for (name, left, hint) in (("&Left corner", 1, cornerhint%("left","left")),
colitem = qmenu.item("C&olumn", makecolumn, "Make a column")
finishitem(colitem)
list.append(colitem)
curvehint = """|Commands for making curves out of brushes.
The brush must be roughly a box, with the usual six sides. The curve is implemented as a `duplicator' containing the brush, which determines the overall shape of the brush.
To resize the curve, select the brush in the treeview, and manipulate the sides in the usual manner (when the brush itself is selected, the curve becomes invisible).
When the duplicator is selected, the entity page provides a variety of specifics that can be manipulated to convert from an `arch' to a `cap' (by unchecking 'inverse'), and much else besides.
The curve will be oriented w.r.t. the map view you RMB-clicked on, or, if you're RMB-ing on the treeview, the most recent mapview you clicked in.
If the brush vanishes without being replaced by a shape, the brush may have been too screwy a shape, or looked at from a bad angle. (My attempts to detect these conditions in advance are meeting with unexpected resistance. There is also a bug in that if you apply this to a brush after first opening the map editor, without inserting anything first, the orientations are wrong.)
morehint= "\n\nThis item is disabled because the poly doesn't have exactly 6 faces."
else:
morehint="\n\nThis item is disabled because I can't figure out which face is front, back, etc. Make it more box-like, and look at it more head-on in the view."
curvepop.hint = curvepop.hint+morehint
curvepop.state = qmenu.disabled
return curvepop
#
# First new menus are defined, then swapped in for the old ones.
# `im_func' returns from a method a function that can be